package net.lijingye.education.response;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import net.lijingye.education.response.meta.BaseMeta;
import net.lijingye.education.vo.PageVO;

/**
 * Created by LijingYe on 2016/3/26.
 */
public abstract class BaseResponse {
    @JSONField(name = "meta", ordinal = 1, serialzeFeatures = SerializerFeature.WriteMapNullValue)
    private BaseMeta meta;
    @JSONField(name = "data", ordinal = 2, serialzeFeatures = SerializerFeature.WriteMapNullValue)
    private Object object;
    @JSONField(name = "page", ordinal = 3)
    private PageVO pageVO;

    public BaseResponse() {
    }

    public BaseResponse(BaseMeta meta, Object object, PageVO pageVO) {
        this.meta = meta;
        this.object = object;
        this.pageVO = pageVO;
    }

    public BaseMeta getMeta() {
        return meta;
    }

    public void setMeta(BaseMeta meta) {
        this.meta = meta;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    public PageVO getPageVO() {
        return pageVO;
    }

    public void setPageVO(PageVO pageVO) {
        this.pageVO = pageVO;
    }

    @Override
    public String toString() {
        return "BaseResponse{" +
                "meta=" + meta +
                ", object=" + object +
                ", pageVO=" + pageVO +
                '}';
    }
}
